<!DOCTYPE html>
<html>
<head>
	<title></title>
	<style>
		#out{width:600px;height:30px;border:1px solid #eee;margin:100px auto;}
		#in{width:0%;background: skyblue;height:30px;}
	</style>
</head>
<body>
	<div id="out">
		<div id="in"></div>
	</div>
</body>

<script>
	var inn = document.getElementById("in");

	// console.dir(inn.style);

	var num = 0;

	add();

	function add()
	{
		inn.style.width = `${num+=5}%`;

		console.log(inn.style.width);

		if(num>=100)
		{
			return;
		}

		

		setTimeout(add,1000);

		// add();
	}
</script>
</html>